local sk__ruya = fk.CreateSkill {

  name = "sk__ruya",

  tags = {  },

}



sk__ruya:addEffect(fk.AfterCardsMove, {
  name = "sk__ruya",
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(sk__ruya.name) and player:isKongcheng() then
      for _, move in ipairs(data) do
        if move.from == player then
          for _, info in ipairs(move.moveInfo) do
            if info.fromArea == Card.PlayerHand then
              return true
            end
          end
        end
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(player.maxHp - player:getHandcardNum(), sk__ruya.name)
    if not player.dead then
      player:turnOver()
    end
  end,
})

return sk__ruya